home *** CD-ROM | disk | FTP | other *** search
- unit ImpImpTestDll;
- { This is the traditional way of importing DLLs. It works fine and requires
- very little code, but the DLL is linked implicitly, meaning the OS will attempt
- to load the DLL at startup. If the DLL is not available, the application will
- not load. Also, startup can be slowed down considerably if there are many
- large DLLs to be loaded. }
- interface
-
- procedure Routine1(A, B, C, D: integer); register;
- procedure Routine2(A, B, C, D: integer); pascal;
- procedure Routine3(A, B, C, D: integer); cdecl;
- procedure Routine4(A, B, C, D: integer); stdcall;
-
- implementation
-
- const
- TestDllName = 'TestDll.Dll';
-
- procedure Routine1; external TestDllName;
- procedure Routine2; external TestDllName name 'Routine2';
- procedure Routine3; external TestDllName index 3;
- procedure Routine4; external TestDllName index 4;
-
- end.
-